import {getData, postData, putData, deleteData} from '../api'

// 获取所有优惠券
export const getProductList = () => {
  return getData('/coupon/getAllCoupon')
}

// 根据id抢优惠券
export const getCoupon = (id:number) => {
  return postData('/coupon/selectCoupon/'+id)
}

// 新增优惠券
export const addProduct = (data:any) => {
  return postData('/coupon/insert', data)
}